package com.hxgis.statisticanalysis.intelligentIndicator.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @TableName ticket_handle_entity
 */
@TableName(value ="ticket_handle_entity")
@Data
public class TicketHandleEntity implements Serializable {
    /**
     * 工单id
     */
    @TableId
    private String id;

    /**
     * 工单流水号
     */
    private String number;

    /**
     * 工单标题
     */
    private String title;

    /**
     * 工单描述
     */
    private String description;

    /**
     * 工单状态1-待接单 2-处理中 3-已完成
     */
    private Integer status;

    /**
     * 是否关注1-是 0-否
     */
    private Integer isattentioned;

    /**
     * 当前环节是否会签 1-是 0-否
     */
    private Integer iscountersign;

    /**
     * 是否接单 1-是 0-否
     */
    private Integer isreceived;

    /**
     * 表单
     */
    private String form;

    /**
     * 执行人列表
     */
    private String executors;

    /**
     * 工单所属模型id
     */
    private String modelId;

    /**
     * 工单发起时间
     */
    private Date createTime;

    /**
     * 创建人id
     */
    private String creatorId;

    /**
     * 创建人名称
     */
    private String creatorName;

    /**
     * 是否可回退 1-是 0-否
     */
    private Integer canRollback;

    /**
     * 当前环节id
     */
    private String activityId;

    /**
     * 当前环节名称
     */
    private String activityName;

    /**
     * 工单优先级
     */
    private Integer urgentLevel;

    /**
     * 附件
     */
    private String attachFiles;

    /**
     * 处理路径
     */
    private String handleRules;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TicketHandleEntity other = (TicketHandleEntity) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getNumber() == null ? other.getNumber() == null : this.getNumber().equals(other.getNumber()))
                && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
                && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
                && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
                && (this.getIsattentioned() == null ? other.getIsattentioned() == null : this.getIsattentioned().equals(other.getIsattentioned()))
                && (this.getIscountersign() == null ? other.getIscountersign() == null : this.getIscountersign().equals(other.getIscountersign()))
                && (this.getIsreceived() == null ? other.getIsreceived() == null : this.getIsreceived().equals(other.getIsreceived()))
                && (this.getForm() == null ? other.getForm() == null : this.getForm().equals(other.getForm()))
                && (this.getExecutors() == null ? other.getExecutors() == null : this.getExecutors().equals(other.getExecutors()))
                && (this.getModelId() == null ? other.getModelId() == null : this.getModelId().equals(other.getModelId()))
                && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
                && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId()))
                && (this.getCreatorName() == null ? other.getCreatorName() == null : this.getCreatorName().equals(other.getCreatorName()))
                && (this.getCanRollback() == null ? other.getCanRollback() == null : this.getCanRollback().equals(other.getCanRollback()))
                && (this.getActivityId() == null ? other.getActivityId() == null : this.getActivityId().equals(other.getActivityId()))
                && (this.getActivityName() == null ? other.getActivityName() == null : this.getActivityName().equals(other.getActivityName()))
                && (this.getUrgentLevel() == null ? other.getUrgentLevel() == null : this.getUrgentLevel().equals(other.getUrgentLevel()))
                && (this.getAttachFiles() == null ? other.getAttachFiles() == null : this.getAttachFiles().equals(other.getAttachFiles()))
                && (this.getHandleRules() == null ? other.getHandleRules() == null : this.getHandleRules().equals(other.getHandleRules()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getNumber() == null) ? 0 : getNumber().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getIsattentioned() == null) ? 0 : getIsattentioned().hashCode());
        result = prime * result + ((getIscountersign() == null) ? 0 : getIscountersign().hashCode());
        result = prime * result + ((getIsreceived() == null) ? 0 : getIsreceived().hashCode());
        result = prime * result + ((getForm() == null) ? 0 : getForm().hashCode());
        result = prime * result + ((getExecutors() == null) ? 0 : getExecutors().hashCode());
        result = prime * result + ((getModelId() == null) ? 0 : getModelId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode());
        result = prime * result + ((getCreatorName() == null) ? 0 : getCreatorName().hashCode());
        result = prime * result + ((getCanRollback() == null) ? 0 : getCanRollback().hashCode());
        result = prime * result + ((getActivityId() == null) ? 0 : getActivityId().hashCode());
        result = prime * result + ((getActivityName() == null) ? 0 : getActivityName().hashCode());
        result = prime * result + ((getUrgentLevel() == null) ? 0 : getUrgentLevel().hashCode());
        result = prime * result + ((getAttachFiles() == null) ? 0 : getAttachFiles().hashCode());
        result = prime * result + ((getHandleRules() == null) ? 0 : getHandleRules().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", number=").append(number);
        sb.append(", title=").append(title);
        sb.append(", description=").append(description);
        sb.append(", status=").append(status);
        sb.append(", isattentioned=").append(isattentioned);
        sb.append(", iscountersign=").append(iscountersign);
        sb.append(", isreceived=").append(isreceived);
        sb.append(", form=").append(form);
        sb.append(", executors=").append(executors);
        sb.append(", modelId=").append(modelId);
        sb.append(", createTime=").append(createTime);
        sb.append(", creatorId=").append(creatorId);
        sb.append(", creatorName=").append(creatorName);
        sb.append(", canRollback=").append(canRollback);
        sb.append(", activityId=").append(activityId);
        sb.append(", activityName=").append(activityName);
        sb.append(", urgentLevel=").append(urgentLevel);
        sb.append(", attachFiles=").append(attachFiles);
        sb.append(", handleRules=").append(handleRules);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}